<template>
    <div class="message-item-wrapper not-padding">
        <swiper :options="options">
            <swiper-slide :key="index" v-for="(each ,index) in item.data">
                <Advertising :item="each"
                             class="not-padding"
                             :value="each.value"/>
            </swiper-slide>
        </swiper>
    </div>
</template>

<script>
    import { swiper, swiperSlide } from 'vue-awesome-swiper'
    import Advertising             from './advertising';

    const defaultOptions = {
        loop      : true,
        autoHeight: true,
        autoplay  : {
            delay: 2000,
        }
    };

    export default {
        components: {
            Advertising,
            swiper,
            swiperSlide
        },
        props     : [ 'item' ],


        data() {
            return {
                currentId: 1,
                options  : Object.assign({}, defaultOptions, this.item.options),
            }
        },
        mounted() {
            console.log('123 :', 123);
        }

    }
</script>

<style scoped>
    .swiper-container {
        flex: auto;
    }
</style>
